import { create } from "zustand"
interface PriceStore { 
  price: number;
  increase: () => void;
  decrease: () => void;
  reset: () => void;
  getPrice: () => number;
}
const usePriceStore = create<PriceStore>((set, get, store) => {
  console.log(store)
  return {
    price: 0,
    increase: () => set((state) => ({ price: state.price + 1 })),
    decrease: () => set((state) => ({ price: state.price - 1 })),
    getPrice: () => get().price,
    reset: () => set(() => ({ price: 0 }))
  }
})

export default usePriceStore